
package com.jf.cloud.combo.listener;

import com.jf.cloud.combo.service.ComboOrderService;
import com.jf.cloud.common.rocketmq.config.RocketMqConstant;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 订单支付成功,套餐订单状态变为已支付、套餐销量增加
 * @author zz
 * @date 2022/9/20 15:02
 *
 */
@Component
@RocketMQMessageListener(topic = RocketMqConstant.COMBO_ORDER_TOPIC,consumerGroup = RocketMqConstant.COMBO_ORDER_TOPIC)
public class ComboOrderPaySucceedListener implements RocketMQListener<List<Long>> {
    @Autowired
    private ComboOrderService comboOrderService;

    @Override
    public void onMessage(List<Long> orderIdS) {
        comboOrderService.comboOrderPaySucceed(orderIdS);
    }
}
